<!-- xuwencheng  2022年6年29日18:00  这是我的wenzhangbianji -->
<!-- 编辑 -->
<template>
  <el-dialog
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    :destory-on-close="true"
    :title="title"
    :visible.sync="dialogFormVisible"
    width="50%"
    @close="close"
  >
    <el-form ref="form" label-width="200px" :model="form" :rules="rules">
      <el-form-item label="反馈图片">
        <!-- <img class="avatar" disabled :src="form.feedbackPictures" /> -->
        <div v-for="(item, index) in form.feedbackPictures" :key="index">
          <el-image :key="index" :src="item" style="width: 50%; height: 50%" />
        </div>
      </el-form-item>
    </el-form>
  </el-dialog>

  <!-- 增加 -->
</template>

<script>
  /* eslint-disable*/
  import { check } from '@/api/fankui'

  //import { number } from 'echarts'
  export default {
    name: 'search',

    data() {
      return {
        selectedOptions: [],
        token: '',
        imageUrl: '',
        value: true,
        value1: true,
        dialogImageUrl: '',
        dialogVisible: false,
        disabled: false,
        options1: [], //审核状态
        options2: [],
        options3: [],
        options5: [
          {
            id: 1,
            creClasName: '通过',
          },
          {
            id: 0,
            creClasName: '不通过',
          },
        ],
        valueone: '',
        valuetwo: '',
        form: {
          feedbackStatus: '', //0-待处理 1-已处理
        },

        rules: {},
        title: '',
        dialogFormVisible: false,
      }
    },
    created() {},
    methods: {
      showEdit(row) {
        if (!row) {
          this.title = '添加'
        } else {
          this.title = '查看图片'
          this.form = Object.assign({}, row)
          console.log(this.form)
        }
        this.dialogFormVisible = true
      },
      optosall(e) {
        console.log(this.form.feedbackStatus)
      },
      close() {
        let userId = this.form.userId
        this.$refs['form'].resetFields()
        this.form = this.$options.data().form
        if (!this.form.id) {
          this.form.userId = userId
        }
        console.log(this.form)
        this.dialogFormVisible = false
        this.imageUrl = ''
        // this.form = ''
      },
      save() {
        const msg = check({
          id: this.form.id,
          feedbackStatus: this.form.feedbackStatus,
        })
        msg.then((res) => {
          console.log(res)
          this.$emit('fetch-data')
          this.close()
          msg.then((res) => {
            if (res.msg === '修改成功') {
              this.$baseMessage(res.msg, 'success', 'vab-hey-message-success')
            }
          })
        })
      },

      nickNameChange() {
        this.$forceUpdate()
      },
    },
  }
</script>
<style>
  .avatar-uploader .el-upload {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
  }
  .avatar-uploader .el-upload:hover {
    border-color: #409eff;
  }
  .avatar-uploader-icon {
    width: 178px;
    height: 178px;
    font-size: 28px;
    line-height: 178px;
    color: #8c939d;
    text-align: center;
  }
  .avatar {
    display: block;
    width: 178px;
    height: 178px;
  }
  .baocun {
    width: 100%;
    height: 100%;
  }
</style>
